//package cn.net.wanji.controller;
//
///**
// * Created by IntelliJ IDEA.
// *
// * @Author : yangliang
// * @create 2022/11/9 15:19
// */
//
//import java.io.*;
//import java.math.BigDecimal;
//import java.text.SimpleDateFormat;
//import java.util.*;
//import java.util.stream.Collectors;
//
//import cn.net.wanji.entity.Logger;
//import cn.net.wanji.entity.ReceiveData;
//import org.apache.poi.hssf.usermodel.*;
//import org.springframework.ui.ModelMap;
//import org.springframework.util.StringUtils;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.ResponseBody;
//
///**
// * @author tian321go
// * 2018年4月9日
// */
//public class LoggerImportController {
//   private static List<Logger> entityList = new ArrayList<>();
//   private static List<ReceiveData> entityList1 = new ArrayList<>();
//    private static List<ReceiveData> entityList2 = new ArrayList<>();
//    private static List<ReceiveData> entityList3 = new ArrayList<>();
//    private static List<ReceiveData> entityList4 = new ArrayList<>();
//    private static List<ReceiveData> entityList5 = new ArrayList<>();
//    private static List<ReceiveData> entityList6 = new ArrayList<>();
//    private static List<ReceiveData> entityList7 = new ArrayList<>();
//    private static List<ReceiveData> entityList8 = new ArrayList<>();
//    private static List<ReceiveData> entityList9 = new ArrayList<>();
//    private static List<ReceiveData> entityList10 = new ArrayList<>();
//    private static List<ReceiveData> entityList11 = new ArrayList<>();
//    private static List<ReceiveData> entityList12 = new ArrayList<>();
//    private static List<ReceiveData> entityList13 = new ArrayList<>();
//    private static List<ReceiveData> entityList14 = new ArrayList<>();
//    public static void main(String[] args) {
//      /*  try {
//            List<Logger> loggers = readFile();
//            //importlogger(loggers);
//        } catch (IOException e) {
//            throw new RuntimeException(e);
//        }*/
//        for (int i = 1; i <39; i++) {
//            List<ReceiveData> receiveData = receiveDataReadFile("D:\\check_data\\2022-11-11-"+i+".log");
//            entityList13.clear();
//        }
//
//        //importReceiveData(receiveData);
//    }
//
//    public static List<Logger> readFile() throws IOException {
//        //获取包含导出内容的对象集合
//       // List<Logger> entityList = new ArrayList<>();
//        //转成file类型
//        File file = new File("D:\\check_data\\cp_5.log");
//        assert file != null;
//        InputStreamReader read = null;
//        try {
//            //先读入再放入缓冲流里面按行读取
//            read = new InputStreamReader(new FileInputStream(file), "UTF-8");
//            BufferedReader br = new BufferedReader(read);
//            String lineTxt;
//            Double times=0.0;
//            int f = 0;
//            Double count = 0.0;
//            while ((lineTxt = br.readLine()) != null) {
//                //跳过注释和空行
//                if (lineTxt.startsWith("#") || StringUtils.isEmpty(lineTxt)) {
//                    continue;
//                }
//                //我这个地方是按空格分割，可以根据自己的业务场景编写规则
//                String[] strings = lineTxt.split(" ");
//                //封装成实体
//                if (strings.length ==4) {
//                    Logger logger = new Logger();
//                    logger.setRecordId(strings[0].split(":")[1]);
//                    logger.setSendFileSize(strings[1].split(":")[1]);
//                    logger.setTime(Double.valueOf(strings[2].split(":")[1]));
//                    logger.setRes(strings[3].substring(4,strings[3].length()));
//                    times = times + Integer.valueOf(strings[2].split(":")[1]);
//                    entityList.add(logger);
//
//                    if ( entityList.size() % 500==0) {
//                        List<Logger> loggers = entityList.subList(f, f + 500);
//                        Optional<Logger> max = entityList.subList(f, f + 500).stream().max(Comparator.comparing(Logger::getTime));
//                        Optional<Logger> min = entityList.subList(f, f + 500).stream().min(Comparator.comparing(Logger::getTime));
//                        //List<Logger> collect = entityList.stream().filter(logger1 -> logger1.getTime()!=max.get().getTime() || logger1.getTime()!=min.get().getTime()).collect(Collectors.toList());
//
//                        for (Logger receiveData : entityList.subList(f, f + 500)) {
//                            if (receiveData.getTime() == max.get().getTime() || receiveData.getTime() == min.get().getTime()) {
//                                continue;
//                            }else {
//                                count = count + Double.valueOf(receiveData.getTime());
//                            }
//
//                        }
//
//                        System.out.println(entityList.size()+" ："+count/(entityList.subList(f, f + 500).size()-2));
//                        f = f + 500;
//                        count = 0.0;
//                        /*System.out.println(max.get().getTime());
//                        System.out.println(min.get().getTime());*/
//                    }
//
//                }
//
//            }
//
//            return entityList;
//        }catch (IOException e) {
//            return null;
//        }finally {
//            if (read != null){
//                read.close();
//            }
//        }
//    }
//
//   /* public static List<ReceiveData> receiveDataReadFile(){
//        //获取包含导出内容的对象集合
//        List<ReceiveData> entityList = new ArrayList<>();
//        //转成file类型
//        File file = new File("D:\\check_data\\cp.log");
//        assert file != null;
//        InputStreamReader read = null;
//        try {
//            //先读入再放入缓冲流里面按行读取
//            read = new InputStreamReader(new FileInputStream(file), "UTF-8");
//            BufferedReader br = new BufferedReader(read);
//            String lineTxt;
//            Double times1=0.0;
//            Double times2=0.0;
//            Double times3=0.0;
//            Double times4=0.0;
//            Double times5=0.0;
//            Double times6=0.0;
//            Double times7=0.0;
//            Double times8=0.0;
//            Double times9=0.0;
//            Double times10=0.0;
//            Double times11=0.0;
//            Double times12=0.0;
//            Double times13=0.0;
//            Double times14=0.0;
//            while ((lineTxt = br.readLine()) != null) {
//                //跳过注释和空行
//                if (lineTxt.startsWith("#") || StringUtils.isEmpty(lineTxt)||!lineTxt.contains("recordId")) {
//                    continue;
//                }
//                //我这个地方是按空格分割，可以根据自己的业务场景编写规则
//                String[] strings = lineTxt.split(" ");
//                //封装成实体
//                if (strings.length >28) {
//                    if (strings[23].contains("G")) {
//                        Integer integer = Integer.valueOf(strings[23].substring(0, strings[23].length() - 1));
//                        if (integer > 400 && integer < 600) {
//
//                            ReceiveData receiveData = new ReceiveData();
//                            receiveData.setRecordId(strings[15].split(":")[1]);
//                            receiveData.setSavetime(strings[18].split(":")[1]);
//                            receiveData.setSavestore(strings[23]);
//                            receiveData.setPercentage(strings[28]);
//                            times1 = times1+Integer.valueOf(receiveData.getSavetime());
//                            entityList1.add(receiveData);
//                        }else if(integer > 600 && integer < 800){
//                            ReceiveData receiveData = new ReceiveData();
//                            receiveData.setRecordId(strings[15].split(":")[1]);
//                            receiveData.setSavetime(strings[18].split(":")[1]);
//                            receiveData.setSavestore(strings[23]);
//                            receiveData.setPercentage(strings[28]);
//                            times2 = times2+Integer.valueOf(receiveData.getSavetime());
//                            entityList2.add(receiveData);
//                        }else if(integer > 800){
//                            ReceiveData receiveData = new ReceiveData();
//                            receiveData.setRecordId(strings[15].split(":")[1]);
//                            receiveData.setSavetime(strings[18].split(":")[1]);
//                            receiveData.setSavestore(strings[23]);
//                            receiveData.setPercentage(strings[28]);
//                            times3 = times3+Integer.valueOf(receiveData.getSavetime());
//                            entityList3.add(receiveData);
//                        }
//                    }else {
//
//                        if (strings[23].contains("T")) {
//                            Double integer = Double.valueOf(strings[23].substring(0, strings[23].length() - 1));
//                            if (integer > 2 && integer < 2.2) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times4 = times4+Integer.valueOf(receiveData.getSavetime());
//                                entityList4.add(receiveData);
//                            } else if (integer > 2.2 && integer < 2.4) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times5 = times5+Integer.valueOf(receiveData.getSavetime());
//                                entityList5.add(receiveData);
//                            }else if (integer > 2.4 && integer < 2.6) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times6 = times6+Integer.valueOf(receiveData.getSavetime());
//                                entityList6.add(receiveData);
//                            }else if (integer > 2.6 && integer < 2.8) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times7 = times7+Integer.valueOf(receiveData.getSavetime());
//                                entityList7.add(receiveData);
//                            }else if (integer > 2.8 && integer < 3.0) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times8 = times8+Integer.valueOf(receiveData.getSavetime());
//                                entityList8.add(receiveData);
//                            }else if (integer > 3.0 && integer < 3.2) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times9 = times9+Integer.valueOf(receiveData.getSavetime());
//                                entityList9.add(receiveData);
//                            }else if (integer > 3.2 && integer < 3.4) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times10 = times10+Integer.valueOf(receiveData.getSavetime());
//                                entityList10.add(receiveData);
//                            }else if (integer > 3.4 && integer < 3.6) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times11 = times11+Integer.valueOf(receiveData.getSavetime());
//                                entityList11.add(receiveData);
//                            }else if (integer > 3.8 && integer < 4.0) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times12 = times12+Integer.valueOf(receiveData.getSavetime());
//                                entityList12.add(receiveData);
//                            }else if (integer > 3.6 && integer < 3.8) {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavestore(strings[23]);
//                                receiveData.setPercentage(strings[28]);
//                                times14 = times14+Integer.valueOf(receiveData.getSavetime());
//                                entityList14.add(receiveData);
//                            }else {
//                                ReceiveData receiveData = new ReceiveData();
//                                receiveData.setRecordId(strings[15].split(":")[1]);
//                                //receiveData.setSavetime(strings[18].split(":")[1]);
//                                receiveData.setSavetime(strings[14].split(":")[1]);
//                                //receiveData.setSavestore(strings[23]);
//                                receiveData.setSavestore(strings[14]);
//                                receiveData.setPercentage(strings[28]);
//                                times13 = times13+Integer.valueOf(receiveData.getSavetime());
//                                entityList13.add(receiveData);
//                            }
//                        }
//
//                    }
//
//
//
//                }
//
//            }
//            System.err.println("times1 "+times1);
//            System.err.println("times2 "+times2);
//            System.err.println("times3 "+times3);
//            System.err.println("times4 "+times4);
//            System.err.println("times5 "+times5);
//            System.err.println("times6 "+times6);
//            System.err.println("times7 "+times7);
//            System.err.println("times8 "+times8);
//            System.err.println("times9 "+times9);
//            System.err.println("times10 "+times10);
//            System.err.println("times11 "+times11);
//            System.err.println("times12 "+times12);
//            System.err.println("times13 "+times13);
//            System.err.println("entityListCount "+entityList.size());
//            System.err.println("entityListCount1 "+entityList1.size());
//            System.err.println("entityListCount2 "+entityList2.size());
//            System.err.println("entityListCount3 "+entityList3.size());
//            System.err.println("entityListCount4 "+entityList4.size());
//            System.err.println("entityListCount5 "+entityList5.size());
//            System.err.println("entityListCount6 "+entityList6.size());
//            System.err.println("entityListCount7 "+entityList7.size());
//            System.err.println("entityListCount8 "+entityList8.size());
//            System.err.println("avg1 "+times1/entityList1.size());
//            System.err.println("avg2 "+times2/entityList2.size());
//            System.err.println("avg3 "+times3/entityList3.size());
//            System.err.println("avg4 "+times4/entityList4.size());
//            System.err.println("avg5 "+times5/entityList5.size());
//            System.err.println("avg6 "+times6/entityList6.size());
//            System.err.println("avg7 "+times7/entityList7.size());
//            System.err.println("avg8 "+times8/entityList8.size());
//            System.err.println("avg9 "+times9/entityList9.size());
//            System.err.println("avg10 "+times10/entityList10.size());
//            System.err.println("avg11 "+times11/entityList11.size());
//            System.err.println("avg12 "+times12/entityList12.size());
//            System.err.println("avg13 "+times13/entityList13.size());
//            System.err.println("avg14 "+times14/entityList14.size());
//
//            return entityList;
//        }catch (IOException e) {
//            return null;
//        }finally {
//            if (read != null){
//                //read.close();
//            }
//        }
//    }*/
//   public static List<ReceiveData> receiveDataReadFile(String path){
//       //获取包含导出内容的对象集合
//       List<ReceiveData> entityList = new ArrayList<>();
//       //转成file类型
//       File file = new File(path);
//       assert file != null;
//       InputStreamReader read = null;
//       try {
//           //先读入再放入缓冲流里面按行读取
//           read = new InputStreamReader(new FileInputStream(file), "UTF-8");
//           BufferedReader br = new BufferedReader(read);
//           String lineTxt;
//           Double times1=0.0;
//           Double times2=0.0;
//           Double times3=0.0;
//           Double times4=0.0;
//           Double times5=0.0;
//           Double times6=0.0;
//           Double times7=0.0;
//           Double times8=0.0;
//           Double times9=0.0;
//           Double times10=0.0;
//           Double times11=0.0;
//           Double times12=0.0;
//           Double times13=0.0;
//           Double times14=0.0;
//           while ((lineTxt = br.readLine()) != null) {
//               //跳过注释和空行
//               if (lineTxt.startsWith("#") || StringUtils.isEmpty(lineTxt)||!lineTxt.contains("recordId")) {
//                   continue;
//               }
//               //我这个地方是按空格分割，可以根据自己的业务场景编写规则
//               String[] strings = lineTxt.split(" ");
//               //封装成实体
//               if (strings[14].contains("T")) {
//                   Double integer = Double.valueOf(strings[14].substring(0, strings[14].length() - 1));
//                   if (integer > 2 && integer < 2.2) {
//                       ReceiveData receiveData = new ReceiveData();
//                       receiveData.setRecordId(strings[15].split(":")[1]);
//                       receiveData.setSavetime(Integer.valueOf(strings[18].split(":")[1]));
//                       receiveData.setSavestore(strings[23]);
//                       receiveData.setPercentage(strings[28]);
//                       times4 = times4+Integer.valueOf(receiveData.getSavetime());
//                       entityList4.add(receiveData);
//                   } else {
//                       ReceiveData receiveData = new ReceiveData();
//                       //receiveData.setRecordId(strings[15].split(":")[1]);
//                       //receiveData.setSavetime(strings[18].split(":")[1]);
//                       receiveData.setSavetime(Integer.valueOf(strings[9].split(":")[1]));
//                       //receiveData.setSavestore(strings[23]);
//                       receiveData.setSavestore(strings[14]);
//                       //receiveData.setPercentage(strings[28]);
//                       times13 = times13+receiveData.getSavetime();
//                       entityList13.add(receiveData);
//
//                   }
//               }
//
//           }
//           Optional<ReceiveData> max = entityList13.stream().max(Comparator.comparing(ReceiveData::getSavetime));
//
//           Optional<ReceiveData> min = entityList13.stream().min(Comparator.comparing(ReceiveData::getSavetime));
//           List<ReceiveData> collect = entityList13.stream().filter(receiveData -> receiveData.getSavetime()==max.get().getSavetime()|| receiveData.getSavetime()==min.get().getSavetime()).collect(Collectors.toList());
//           Double count = 0.0;
//           int i = 0;
//           //取中位数
//        //List<Integer> list = new ArrayList<>();
//           for (ReceiveData receiveData : entityList13) {
//               count = count + Double.valueOf(receiveData.getSavetime());
//               i++;
//           }
//
//           Integer i1 = max.get().getSavetime() + min.get().getSavetime();
//           double j = 0;
//           int flage=0;
//           Map<Integer,Integer> list1 = new TreeMap<>();
//           entityList13.sort(Comparator.comparing(ReceiveData::getSavetime));
//           for (int i2 = 0; i2 < entityList13.size()-1; i2++) {
//               if (entityList13.get(i2).getSavetime() == entityList13.get(i2 + 1).getSavetime()) {
//
//                   flage++;
//               }else {
//                   list1.put(entityList13.get(i2).getSavetime(), flage+1);
//                   flage=0;
//               }
//
//           }
//           if(entityList13.size() % 2 == 1){
//
//               j = entityList13.get((entityList13.size()-1)/2).getSavetime();
//
//           }else {
//
////加0.0是为了把int转成double类型，否则除以2会算错
//
//               j = (entityList13.get(entityList13.size()/2-1).getSavetime() + entityList13.get(entityList13.size()/2).getSavetime() + 0.0)/2;
//
//           }
//           System.out.println(entityList13.get(0).getSavestore() + "   " + (count - Double.valueOf(i1.toString())) / (i - 2) + "     " + j + "   " + list1.toString());
//
//          // System.out.println(entityList13);
//
//           return entityList;
//       }catch (IOException e) {
//           return null;
//       }finally {
//           if (read != null){
//               //read.close();
//           }
//       }
//   }
//
//    public static void importlogger(List<Logger> entityList) {
//        String fileName = "D:\\check_data\\"+System.currentTimeMillis()+".xls"; //文件名
//        String sheetName = "日志详细记录";//sheet名
//
//        String []title = new String[]{"recordId","sendFileSize","time","res"};//表格标题
//
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//
//        String [][]values = new String[entityList.size()][];
//        for(int i=0;i<entityList.size();i++){
//            values[i] = new String[title.length];
//            //将对象内容转换成string
//            Logger obj = entityList.get(i);
//            values[i][0] = obj.getRecordId();
//            values[i][1] = obj.getSendFileSize();
//            values[i][2] = obj.getTime().toString();
//            values[i][3] = obj.getRes();
//        }
//        List<String> sheetNameList = new ArrayList<>();
//        sheetNameList.add("1.log");
//        sheetNameList.add("2.log");
//        sheetNameList.add("3.log");
//        for (String s : sheetNameList) {
//            HSSFWorkbook wb = getHSSFWorkbook(s, title, values, null);
//
//            //将文件存到指定位置
//            try {
//                fileName = new String(fileName.getBytes(),"ISO8859-1");
//                OutputStream os = new FileOutputStream(fileName);
//                wb.write(os);
//                os.flush();
//                os.close();
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//        }
//
//
//    }
//
//   /* public static void tests(String[] strings,String times4,List<ReceiveData> entityList){
//        ReceiveData receiveData = new ReceiveData();
//        receiveData.setRecordId(strings[15].split(":")[1]);
//        receiveData.setSavetime(strings[18].split(":")[1]);
//        receiveData.setSavestore(strings[23]);
//        receiveData.setPercentage(strings[28]);
//        times4 = times4+Integer.valueOf(receiveData.getSavetime());
//        entityList.add(receiveData);
//    }*/
//
//    public static void importReceiveData(List<ReceiveData> entityList) {
//        String fileName = "D:\\check_data\\"+System.currentTimeMillis()+".xls"; //文件名
//        String sheetName = "日志详细记录";//sheet名
//
//        String []title = new String[]{"recordId","savetime","savestore","percentage"};//表格标题
//
//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//
//        String [][]values = new String[entityList.size()][];
//        for(int i=0;i<entityList.size();i++){
//            values[i] = new String[title.length];
//            //将对象内容转换成string
//            ReceiveData obj = entityList.get(i);
//            values[i][0] = obj.getRecordId();
//            //values[i][1] = obj.getSavetime();
//            values[i][2] = obj.getSavestore();
//            values[i][3] = obj.getPercentage();
//        }
//
//            HSSFWorkbook wb = getHSSFWorkbook(sheetName, title, values, null);
//
//            //将文件存到指定位置
//            try {
//                fileName = new String(fileName.getBytes(),"ISO8859-1");
//                OutputStream os = new FileOutputStream(fileName);
//                wb.write(os);
//                os.flush();
//                os.close();
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//
//
//
//    }
//
//    public static HSSFWorkbook getHSSFWorkbook(String sheetName,String []title,String [][]values, HSSFWorkbook wb){
//        // 创建HSSFWorkbook对象
//        if(wb == null){
//            wb = new HSSFWorkbook();
//        }
//        // 在HSSFWorkbook添加一个sheet
//        HSSFSheet sheet = wb.createSheet(sheetName);
//        // 在sheet中添加表头第0行
//        HSSFRow row = sheet.createRow(0);
//        // 创建单元格，并设置值表头格式
//        HSSFCellStyle style = wb.createCellStyle();
//        short align=2;
//        style.setAlignment(align); // 创建一个居中格式
//
//        HSSFCell cell = null;
//        //添加标题内容
//        for(int i=0;i<title.length;i++){
//            cell = row.createCell(i);
//            cell.setCellValue(title[i]);
//            cell.setCellStyle(style);
//        }
//        //添加正文内容
//        int index = 0;//记录额外创建的sheet数量
//        for(int i=0;i<values.length;i++){
//            if ((i + 1) % 65535 == 0) {
//                sheet = wb.createSheet();
//                row = sheet.createRow(0);
//                String[] column = values[i];
//                for (int c = 0; c < column.length; c++) {
//                    cell = row.createCell(c);
//                    cell.setCellValue(new HSSFRichTextString(values[i][c]));
//                }
//                index++;
//            }
//            row = sheet.createRow((i + 1) - (index * 65535));
//            String[] column = values[i];
//            for (int c = 0; c < column.length; c++) {// excel cell
//                cell = row.createCell(c);
//                cell.setCellValue(new HSSFRichTextString(values[i][c]));
//            }
//            System.out.println("+++++++++++++++++++++");
//
//
//           /* row = sheet.createRow(i + 1);
//            for(int j=0;j<values[i].length;j++){
//                row.createCell(j).setCellValue(values[i][j]);
//            }*/
//        }
//
//        return wb;
//    }
//}
